package cc.openhome;

/**
 * Created by Cai Ye on 2016/3/19.
 */
public class CallByValue {
    public static void main(String[] args) {
        Customer c1 = new Customer("Justin");
        some(c1);
        System.out.println(c1.name);

        Customer c2=new Customer("Justin");
        System.out.println(c2.name);

    }

    static void some(Customer c) {
        c.name = "John";
    }

    static void other(Customer c) {
        c = new Customer("Bill");
    }

}
    class Customer{
        String name;
        Customer(String name){
            this.name=name;
        }
    }

